import request from '@/utils/request'
/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: {
      dictCode
    }
  })
}
/**
  * 每日一练分页
  * @param {*} data
  */
export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/dailyRactice/queryPage',
    method: 'post',
    data
  })
}
/**
  * 每日一练新增
  * @param {*} data
  */
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/dailyRactice/insert',
    method: 'post',
    data
  })
}
/**
  * 每日一练编辑
  * @param {*} data
  */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/dailyRactice/update',
    method: 'post',
    data
  })
}
/**
  * 编辑回显
  * @param {*} data
  */
export function get(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/dailyRactice/get',
    method: 'post',
    data
  })
}
/**
  * 每日一练修改状态该
  * @param {*} data
  */
export function updateStatus(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/dailyRactice/updateStatus',
    method: 'post',
    data
  })
}
/**
  * 每日一练删除
  * @param {*} data
  */
export function del(id) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/dailyRactice/deleteById',
    method: 'post',
    data: {
      id
    }
  })
}
/**
 * 获取分类树
 */
export function getClassifyTree(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/learnClassify/getClassifyTree',
    method: 'post',
    data
  })
}
